package org.drushpal.model.vo
{
	[Bindable]
	public class Project
	{
		public var title:String;		
		public var short_name:String;
		public var creator:String;
		public var link:String;
		public var terms:Array;
		public var status:String;
		public var api_versions:Array;
		public var releases:Array;
		
		public function Project()
		{
		}
		
		public function listTerms(concat:String=","):String{
			var out:String="";
			var len:int = terms.length;
			for(var i:int=0;i<len;i++){
				if(i!=0)out+=concat+" ";
				out+= Term(terms[i]).value; // Term(terms[i]).name + ":" +
			}
			return out;
		}
		public function hasTerm(value:String):Boolean{
			var bFound:Boolean = false;
			for each(var term:Term in terms){
				if(term.value.toLowerCase() == value.toLowerCase()){
					 bFound = true;
					 break;
				}
			}
			return bFound;
		}
	}
}